<?php
if (isset($_POST['openid']) && !empty($_POST['openid'])){
    include '../c/config.php';
    include 'thearray.php';
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {}
    $openid=addslashes(trim($_POST['openid']));
    $query=$mysqli->query("SELECT id FROM qdui where openid='".$openid."'  limit 0,1 ");
    $getDui=$query->fetch_assoc();
    $duiId=$getDui['id'];
    $applyList=array();
    
    
    $query=$mysqli->query("SELECT id,openid,weizhi,qiuhao FROM joinqiu where qiuid='".$duiId."' and isapply=0  ");
    while ($list=$query->fetch_assoc()){
        $queryU=$mysqli->query("SELECT * FROM `uinfo` where openid='".$list['openid']."' ");
        $getU=$queryU->fetch_assoc();

        $applyList[]=array('id'=>$list['id'],'qiuhao'=>$list['qiuhao'],'weizhi'=>$weizhiList[$list['weizhi']],
            'name'=>$getU['name'],'gao'=>$getU['gao'],'weight'=>$getU['weight']);
    }
    
    
    $mysqli->close();
    echo json_encode(array('a'=>$applyList));
}

